package me.muci.B_threadMethods.DaemonTest;

/**
 * ClassName: Test <br/>
 * Description: <br/>
 * date: 2021/8/9 11:06<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        ThreadRunning running = new ThreadRunning();
        Thread threadRunning = new Thread(running);
        threadRunning.start();

        //使用守护进行关闭上方一直运行的进程
        ThreadDaemon threadDaemon = new ThreadDaemon();
        Thread daemon = new Thread(threadDaemon,"daemon");
        daemon.setDaemon(true);
        daemon.start();
    }
}
